package com.heima.user.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dto.LoginDto;
import com.heima.user.service.ApUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/login")
@Api(tags = "app段用户登录接口", description = "app段用户登录接口")
public class ApUserLoginController {

    @Autowired
    private ApUserService apUserService;

    /**
     * app登录接口
     * @param dto
     * @return
     */
    @PostMapping("/login_auth")
    @ApiOperation(value = "app登录接口", notes = "app登录接口")
    public ResponseResult login(@RequestBody LoginDto dto) {
        return apUserService.login(dto);
    }
}
